A B C E I N P S T

A

addCar(Car) - Method in class Train
 

B

book() - Method in class Seat
If this seat is available, books it and returns true.
bookNextSeat() - Method in class Car
Attempts to book a seat.
BUSINESS_SEAT_COST - Static variable in class Car
The cost of a business class seat, in dollars.
BUSINESS_SEATS - Static variable in class Car
The number of seats in a business class car.

C

cancelBooking() - Method in class Seat
If this seat is booked, cancels the booking and returns true.
cancelSeat(int) - Method in class Car
Cancels the booking for the specified seat, which must be between 1 and the maximum number of seats in the car.
cancelTicket(int, int) - Method in class Train
 
Car - Class in <Unnamed>
 
Car(int, boolean) - Constructor for class Car
Constructs a new Car object with the specified id.
CarTest - Class in <Unnamed>
The test class CarTest.
CarTest() - Constructor for class CarTest
Default constructor for test class CarTest

E

ECONOMY_SEAT_COST - Static variable in class Car
The cost of an economy class seat, in dollars.
ECONOMY_SEATS - Static variable in class Car
The number of seats in an economy class car.

I

id() - Method in class Car
Returns the id of this car.
isBooked() - Method in class Seat
Returns true if someone has purchased a ticket for this this Seat.
isBusinessClass() - Method in class Car
Returns true if this is a business-class car, false if this is an economy-class car.
issueTicket(boolean) - Method in class Train
 

N

number() - Method in class Seat
Returns this seat's number.

P

price() - Method in class Seat
Returns the cost of purchasing a ticket for this Seat.

S

Seat - Class in <Unnamed>
Seat models a seat in a car in a passenger train.
Seat(int, double) - Constructor for class Seat
Constructs a new Seat with the specified seat number and ticket price.
seats() - Method in class Car
Returns this car's list of seats.
SeatTest - Class in <Unnamed>
The test class SeatTest.
SeatTest() - Constructor for class SeatTest
Default constructor for test class SeatTest
setUp() - Method in class CarTest
Sets up the test fixture.
setUp() - Method in class SeatTest
Sets up the test fixture.

T

tearDown() - Method in class CarTest
Tears down the test fixture.
tearDown() - Method in class SeatTest
Tears down the test fixture.
testBooking() - Method in class SeatTest
 
testBookNextSeat() - Method in class CarTest
 
testCancelBooking() - Method in class SeatTest
 
testCancelSeat() - Method in class CarTest
 
testCreateBusinessCar() - Method in class CarTest
 
testCreateEconomyCar() - Method in class CarTest
 
testCreateSeat() - Method in class SeatTest
 
testID() - Method in class CarTest
 
testIsBusinessClass() - Method in class CarTest
 
Train - Class in <Unnamed>
 
Train(int) - Constructor for class Train
 

A B C E I N P S T